/**
 * @Author: 小狐
 * @Date: 2021/11/29 17:40
 * @Describe 主动去学习
 *
 */
package dao

import (
	"context"
	"dubbo_maoyan/api/api"
	"event/model"
)

type eventDao struct{}

var EventDao = eventDao{}

func(e *eventDao) SendEvent (ctx context.Context,request *api.EventRequest) ([]*model.Event,error) {

	var eventList []*model.Event

	Connection.Where("event_status = ?",request.EventStatus).Find(&eventList);

	return eventList, nil
}
